\hypertarget{classTree}{\section{Tree类 参考}
\label{classTree}\index{Tree@{Tree}}
}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTree_ac7482844e045c050e8fb7d30c702618c}{{\bfseries \-\_\-\-\_\-construct} (\&\$arr=array(), \$config=array())}\label{classTree_ac7482844e045c050e8fb7d30c702618c}

\item 
\hypertarget{classTree_a798fa960bf4da294be87e0181e0fe2ac}{{\bfseries \-\_\-\-\_\-get} (\$name)}\label{classTree_a798fa960bf4da294be87e0181e0fe2ac}

\item 
\hypertarget{classTree_a000e07f2d7585265b1ff5eeef73d2650}{{\bfseries \-\_\-\-\_\-set} (\$name, \$value)}\label{classTree_a000e07f2d7585265b1ff5eeef73d2650}

\item 
\hypertarget{classTree_aa82f443847208a6cf6712dde1cb351a1}{{\bfseries \-\_\-\-\_\-isset} (\$name)}\label{classTree_aa82f443847208a6cf6712dde1cb351a1}

\item 
\hyperlink{classTree_a5886f85e08b546345b7a9ce514f9f388}{get\-\_\-child} (\$parent\-\_\-id)
\item 
\hyperlink{classTree_a72bec9fd3c125294289b9d6f72ed439b}{get\-\_\-tree} (\$parent\-\_\-id=0, \$rule='', \&\$select\-\_\-id= '', \$indentation= '')
\end{DoxyCompactItemize}


\subsection{详细描述}
tree 类 
\begin{DoxyParams}{参数}
{\em array} & 2维数组，例如： array( 1 =$>$ array('id'=$>$'1','parent\-\_\-id'=$>$0,'name'=$>$'一级栏目一'), 2 =$>$ array('id'=$>$'2','parent\-\_\-id'=$>$0,'name'=$>$'一级栏目二'), 3 =$>$ array('id'=$>$'3','parent\-\_\-id'=$>$1,'name'=$>$'二级栏目一'), 4 =$>$ array('id'=$>$'4','parent\-\_\-id'=$>$1,'name'=$>$'二级栏目二'), 5 =$>$ array('id'=$>$'5','parent\-\_\-id'=$>$2,'name'=$>$'二级栏目三'), 6 =$>$ array('id'=$>$'6','parent\-\_\-id'=$>$3,'name'=$>$'三级栏目一'), 7 =$>$ array('id'=$>$'7','parent\-\_\-id'=$>$3,'name'=$>$'三级栏目二') ) \\
\hline
\end{DoxyParams}


\subsection{成员函数说明}
\hypertarget{classTree_a5886f85e08b546345b7a9ce514f9f388}{\index{Tree@{Tree}!get\-\_\-child@{get\-\_\-child}}
\index{get\-\_\-child@{get\-\_\-child}!Tree@{Tree}}
\subsubsection[{get\-\_\-child}]{\setlength{\rightskip}{0pt plus 5cm}Tree\-::get\-\_\-child (
\begin{DoxyParamCaption}
\item[{}]{\$parent\-\_\-id}
\end{DoxyParamCaption}
)}}\label{classTree_a5886f85e08b546345b7a9ce514f9f388}
获取子数组 \hypertarget{classTree_a72bec9fd3c125294289b9d6f72ed439b}{\index{Tree@{Tree}!get\-\_\-tree@{get\-\_\-tree}}
\index{get\-\_\-tree@{get\-\_\-tree}!Tree@{Tree}}
\subsubsection[{get\-\_\-tree}]{\setlength{\rightskip}{0pt plus 5cm}Tree\-::get\-\_\-tree (
\begin{DoxyParamCaption}
\item[{}]{\$parent\-\_\-id = {\ttfamily 0}, }
\item[{}]{\$rule = {\ttfamily ''}, }
\item[{\&}]{\$select\-\_\-id = {\ttfamily ''}, }
\item[{}]{\$indentation = {\ttfamily ''}}
\end{DoxyParamCaption}
)}}\label{classTree_a72bec9fd3c125294289b9d6f72ed439b}
得到树型结构 
\begin{DoxyParams}[1]{参数}
int & {\em \$parent\-\_\-id} & I\-D，表示获得这个\-I\-D下的所有子级 \\
\hline
string & {\em \$rule} & 生成树型结构的基本代码，例如：\char`\"{}$<$option value=\textbackslash{}\$id \textbackslash{}\$selected$>$\textbackslash{}\$spacer\textbackslash{}\$name$<$/option$>$\char`\"{} \\
\hline
int | string & {\em \$select\-\_\-id} & 被选中的\-I\-D，比如在做树型下拉框的时候需要用到 \\
\hline
string & {\em \$indentation} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
string 
\end{DoxyReturn}


该类的文档由以下文件生成\-:\begin{DoxyCompactItemize}
\item 
templi/Tree.\-class.\-php\end{DoxyCompactItemize}
